import { h } from 'vue';
import { NAvatar, NButton } from 'naive-ui';
import { BasicColumn } from '@/components/Table';
export interface ListData {
  id: string;
  name: string;
  avatar: string;
  address: string;
  beginTime: string;
  endTime: string;
  date: string;
  [key: string]: string;
}
export function columns(): BasicColumn<ListData>[] {
  return [
    {
      title: '店铺名称',
      key: 'shop_name',
    },
    {
      title: 'eBay订单号',
      key: 'eBay_order_number',
      render(row) {
        return h(
          'span',
          {
            size: 'small',
            text: true,
            onClick: () => sendMail(row),
          },
          { default: () => row.eBay_order_number }
        );
      },
    },
    {
      title: '出单时间',
      key: 'issue_time',
    },
    {
      title: '最晚发货时间',
      key: 'latest_delivery_time',
    },
    {
      title: '最晚到货时间',
      key: 'latest_arrival_time',
    },
    {
      title: '任务提交时间',
      key: 'commit_time',
    },
    {
      title: '任务归属人',
      key: 'task_people',
    },
    {
      title: '任务状态',
      key: 'task_status',
      render(row) {
        return row.task_status ? '通过' : '未通过';
      },
    },

    {
      title: '任务信息',
      key: 'task_msg',

    },
  ];
}
